"""
简化的异常类 - 只保留必要的异常定义
"""


class DownloaderError(Exception):
    """下载器基础异常类"""

    def __init__(self, message: str, error_code: str = None):
        super().__init__(message)
        self.message = message
        self.error_code = error_code

    def __str__(self):
        if self.error_code:
            return f"[{self.error_code}] {self.message}"
        return self.message


class AuthenticationError(DownloaderError):
    """认证错误"""
    pass


class ConfigError(DownloaderError):
    """配置错误"""
    pass


class NetworkError(DownloaderError):
    """网络错误"""
    pass



